package com.linwen.excise.leetcode;

/**
 * @ClassName _1672最富有客户的资产总量
 * @Description TODO
 * @Author zero
 * @DATE 2024/10/7 1:49 PM
 * @Version 1.0
 */
public class _1672最富有客户的资产总量 {
    public static void main(String[] args) {
        _1672最富有客户的资产总量 inst = new _1672最富有客户的资产总量();
        int[][] accounts = {{1,2,3},{3,2,1}};
        System.out.println(inst.maximumWealth(accounts));

    }

    public int maximumWealth(int[][] accounts) {
        int res = 0;
        for (int[] account : accounts) {
            int temp = 0;
            for (int i : account) {
                temp += i;
            }
            if (temp > res) {
                res = temp;
            }
        }
        return res;
    }
}
